﻿using System;
using System.Linq;

using SimpleForum.Data.Models;

namespace SimpleForum.Classes.Core.Extensions
{
    public static class UserExtensions
    {
        public static User GetUserByEmail(this IQueryable<User> Users, string Email)
        {
            return Users.Where(User => User.Email == Email).SingleOrDefault();
        }
    }
}